package com.moioo.exam;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import org.apache.struts.action.ActionForm;

/**
 * TVod entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TVod extends ActionForm implements java.io.Serializable {
	private static final long serialVersionUID = -5412232227231427346L;

	private Integer id;
	private String name;
	private String info;
	private String keyword;
	private Short state = 0;
	private Date createtime;
	private Date lasttime;
	private Integer hits=0;
	private String author;
	private String pdfPath;
	private String canDown;
	private Set TVodfiles = new HashSet(0);
	
	private Integer vodClass;

	public Integer getVodClass() {
		return vodClass;
	}

	public void setVodClass(Integer vodClass) {
		this.vodClass = vodClass;
	}

	/** default constructor */
	public TVod() {
	}

	/** full constructor */
	public TVod(String name, String info, Short state, Date createtime,
			Date lasttime, Set TVodfiles) {
		this.name = name;
		this.info = info;
		this.state = state;
		this.createtime = createtime;
		this.lasttime = lasttime;
		this.TVodfiles = TVodfiles;
	}
	public String getCreatetimeStr() {
		if(createtime == null)return "";
		return new SimpleDateFormat("yy-MM-dd HH:mm").format(this.createtime);
	}
	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getInfo() {
		return this.info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public Short getState() {
		return this.state;
	}

	public void setState(Short state) {
		this.state = state;
	}

	public Date getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getLasttime() {
		return this.lasttime;
	}

	public void setLasttime(Date lasttime) {
		this.lasttime = lasttime;
	}

	@SuppressWarnings("unchecked")
	public Set<TVodfile> getTVodfiles() {
		return this.TVodfiles;
	}

	public void setTVodfiles(Set TVodfiles) {
		this.TVodfiles = TVodfiles;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public void setHits(Integer i){
		this.hits = i;
	}
	public Integer getHits(){
		return this.hits;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getCanDown() {
		return canDown;
	}

	public void setCanDown(String canDown) {
		this.canDown = canDown;
	}

	public String getPdfPath() {
		return pdfPath;
	}

	public void setPdfPath(String pdfPath) {
		this.pdfPath = pdfPath;
	}
}